package com.situ.fly.config;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.servlet.config.annotation.InterceptorRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;

import com.situ.fly.interceptor.UserInterceptor;

/**
 * 
 * 
 * 编写一个SpringMVC的配置类
 * 
 *
 */
@Configuration//告诉Spring容器，这是一个配置类
public class WebConfig implements WebMvcConfigurer {
    @Autowired
    private UserInterceptor userInterceptor ;
	 public void addInterceptors(InterceptorRegistry  registry) {
		
		 registry.addInterceptor(userInterceptor).addPathPatterns("/jie/add","/jie/reply");
	}
}
